// Base class
//
// Kickstart any navigation component with a set of style resets. Works with
// `<nav>`s or `<ul>`s.

.nav {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
  align-items: center;
  font-size: 14px;
  // font-weight: bold;
}

.nav-link {
  color: $gray-600;
  display: flex;
  align-items: center;
  padding: 0 $nav-link-padding-x;
  height: 64px;
  position: relative;

  @include hover-focus {
    color: $gray-700;
    text-decoration: none;
  }

  @include media-breakpoint-down(sm) {
    height: 56px;
  }

  // Disabled state lightens text
  &.disabled {
    color: $nav-link-disabled-color;
  }

  // Title
  &.nav-title {
    font-size: 20px;
  }

  // Active
  &.active {
    color: $gray-900;
  }
  &.active::after {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    display: block;
    content: "";
    background: theme-color("primary");
  } 
}

// 为icon添加动画效果
.nav-link-icon {
  transition: all .15s ease-in-out;
}

//
// Tabs
//

.nav-tabs {
  border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;

  .nav-item {
    margin-bottom: -$nav-tabs-border-width;
  }
  
  .nav-link {
    border: $nav-tabs-border-width solid transparent;
    @include border-top-radius($nav-tabs-border-radius);

    @include hover-focus {
      border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
    }

    &.disabled {
      color: $nav-link-disabled-color;
      background-color: transparent;
      border-color: transparent;
    }
  }

  .nav-link.active,
  .nav-item.show .nav-link {
    color: $nav-tabs-link-active-color;
    background-color: $nav-tabs-link-active-bg;
    border-color: $nav-tabs-link-active-border-color $nav-tabs-link-active-border-color $nav-tabs-link-active-bg;
  }

  .dropdown-menu {
    // Make dropdown border overlap tab border
    margin-top: -$nav-tabs-border-width;
    // Remove the top rounded corners here since there is a hard edge above the menu
    @include border-top-radius(0);
  }
}


//
// Pills
//

.nav-pills {
  .nav-link {
    @include border-radius($nav-pills-border-radius);

    &.active,
    .show > & {
      color: $nav-pills-link-active-color;
      background-color: $nav-pills-link-active-bg;
    }
  }
}


//
// Justified variants
//

.nav-fill {
  .nav-item {
    flex: 1 1 auto;
    text-align: center;
  }
}

.nav-justified {
  .nav-item {
    flex-basis: 0;
    flex-grow: 1;
    text-align: center;
  }
}


// Tabbable tabs
//
// Hide tabbable panes to start, show them when `.active`

.tab-content {
  > .tab-pane {
    display: none;
  }
  > .active {
    display: block;
  }
}
